package com.study.visitor.general;

public class ConcreteVisitorA implements IVisitor {
    public void visit(ConcreteElementA element) {
        String result = element.operationA();
        System.out.println("result from " + element.getClass().getSimpleName() + ": " + result);
    }


    public void visit(ConcreteElementB element) {
        int result = element.operationB();
        System.out.println("result from " + element.getClass().getSimpleName() + ": " + result);
    }

    public void visit(IElement element){
        if(element instanceof ConcreteElementA){

        }else if(element instanceof ConcreteElementB){

        }
        else if(element instanceof ConcreteElementB){

        }
        else if(element instanceof ConcreteElementB){

        }
        else if(element instanceof ConcreteElementB){

        }
        else if(element instanceof ConcreteElementB){

        }
        else if(element instanceof ConcreteElementB){

        }else if(element instanceof ConcreteElementB){

        }

    }
}
